package com.design.model2;

import com.design.model2.impl.ConcreteStrategyA;
import com.design.model2.impl.ConcreteStrategyB;

/**
 * @author by liuxin
 * @version 0.1
 * @Classname Client
 * @Description 客户端，使用方
 */
public class Client {

    public static void main(String[] args) {
        Context context;

        context = new Context(new ConcreteStrategyA());
        context.contextInterface();

        context = new Context(new ConcreteStrategyB());
        context.contextInterface();
        //缺点：1、存在耦合性Context类和具体的策略类之前存在较大的耦合性
        // 2、且客户端承担比较大的职责,由客户端确认选择什么具体策略角色
    }
}
